package com.kate.mall.order.service;

import com.kate.mall.common.utils.R;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public interface WxOrderService {
    /**
     * 付款订单的预支付会话标识
     * <p>
     * 1. 检测当前订单是否能够付款
     * 2. 微信商户平台返回支付订单ID
     * 3. 设置订单付款状态
     *
     * @param userId 用户ID
     * @param body   订单信息，{ orderId：xxx }
     * @return 支付订单ID
     */
    R prepay(Integer userId, String body, HttpServletRequest request);

    Object payNotify(HttpServletRequest request, HttpServletResponse response) throws Exception;
}
